package ooday03;

public class InterfaceDemo {
    public static void main(String[] args) {
//        interface o=new Inter6();
//        interface i=new Inter();


    }
}



//接口的语法
interface Inter{
    public abstract void show();//完整写法
    void test();//默认public abstract
    void test1();
//    void say(){} //编译错误，抽象方法不能有方法体
}
class Foo implements Inter{

    @Override
    public void show() {

    }

    @Override
    public void test() {

    }

    @Override
    public void test1() {

    }
}

interface Inter1{
    void show();
    void test();
}
class Aoo implements Inter1{
   public void show(){
       System.out.println("jjj");
    }
    public void test(){
        System.out.println("");
    }
}

    interface Inter2{
       void show();
       void test();
    }
    class Boo implements Inter2{
       public void show(){ }
       public void test(){}
    }
    //演示接口的多实现
    interface Inter3{
    void test();
    }
    interface Inter4{
    void show();
    }
    abstract class Coo{
    abstract void say();
    }
    //即继承又实现时，应该先继承后实现
    class Doo extends Coo implements Inter3,Inter4{
    public  void show(){}
        public void test(){}
        void say(){}
    }

    interface Inter5{
    void show();
    }
//接口可以继承接口
    interface Inter6 extends Inter5{
    void test();
    }
    class Eoo implements Inter6{
    public void test(){}
        public void show(){}
    }







